<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>验证餐桌名</title>
<link rel="stylesheet" href="css/input.css" />
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<style type="text/css">
	body{
			font-size: 14px;
			background-color:#1f687a;
		}
	.tishi{
		width:200px;
		height:30px;
		float:left;
		margin:23px 0px 0px 0px;
		display: none;
		font-size:12px;
		color:white;
		
	}
	.vertify {
		width: 150px;
		height: 30px;
		font-size: 14px;
		font-weight:bold;
		border: 1px solid white;
		border-radius: 3px;
		margin: 0px 50px;
		background-color:#7ab893;
		color:white;
		cursor: pointer;
	}
</style>
</head>
<body>
	<div id='container'>
	 	<div class='message'>
	  		<label style="margin:20px 20px;">
				<input type='text' id="number">
		      	<span>餐桌名</span>
		    </label>
		    <span class="tishi">请输入餐桌名</span>
		</div>
	</div>
	<input type="button" value="验证" class="vertify"/>
</body>
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<script type="text/javascript">
$(function(){
	$(".vertify").click(function(){
		var number=$("#number").val();
		if(number.lenth==0){
			$(".tishi").show();
		}else{
			$.get("VertifyTable",{table_name:number},function(v){
				$(".tishi").show();
				$(".tishi").text(v);
				if(v.trim()!="今天没有该餐桌的未结账记录"&&v!="餐桌名不存在"){
					parent.guanbi();
					$("#iframe",parent.document).attr("src","GoodsServlet?op=13&pagesize=10&curpage=1");
					
				}
			});
		}
	})
})
	
</script>
</body>
</html>